rem load remote configuration settings
call "%~sdp0Version.bat"
call "%~sdp0Source.bat"
call "%~sdp0Constant.bat"

rem set constants
set DEVENVEXEFILE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com
set PUBLISHPATH=%TEMP%\Publish\ContentRendering\%MAJOR%.%MINOR%.%REVISION%
set LOADERENGINECOMPONENTTESTXMLFILE=%~sdp0..\Library\NUNit\NUnit-LoaderEngineComponent.xml
set PARSERENGINECOMPONENTTESTXMLFILE=%~sdp0..\Library\NUNit\NUnit-ParserEngineComponent.xml
set RENDERENGINECOMPONENTTESTXMLFILE=%~sdp0..\Library\NUNit\NUnit-RenderEngineComponent.xml
set DATAENGINECOMPONENTTESTXMLFILE=%~sdp0..\Library\NUNit\NUnit-DataEngineComponent.xml
set PUBLISHAPISYSTEMTESTDLLFILE=%TEMP%\Publish\ContentRendering\%MAJOR%.%MINOR%.%REVISION%\ContentRenderingApiSystemTest.dll
set HGTEMPFILE=%TEMP%\ContentRendering.%MAJOR%.%MINOR%.%REVISION%.tmp
set DOTNET4FRAMEWORKPATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319
set BACKUPAPIASSEMBLYINFO=%TEMP%\ContentRenderingApiAssemblyInfo.cs.backup
set BACKUPAPISYSTEMTESTASSEMBLYINFO=%TEMP%\ContentRenderingApiSystemTestAssemblyInfo.cs.backup
set DEBUGLOADERENGINECOMPONENTTESTDLLFILE=%~sdp0..\Source\Com\ContentRendering\Api\LoaderEngineComponentTest\bin\Debug\LoaderEngineComponentTest.dll
set DEBUGPARSERENGINECOMPONENTTESTDLLFILE=%~sdp0..\Source\Com\ContentRendering\Api\ParserEngineComponentTest\bin\Debug\ParserEngineComponentTest.dll
set DEBUGRENDERENGINECOMPONENTTESTDLLFILE=%~sdp0..\Source\Com\ContentRendering\Api\RenderEngineComponentTest\bin\Debug\RenderEngineComponentTest.dll
set DEBUGDATAENGINECOMPONENTTESTDLLFILE=%~sdp0..\Source\Com\ContentRendering\Api\DataEngineComponentTest\bin\Debug\DataEngineComponentTest.dll
set RELEASEAPISYSTEMTESTDLLFILE=%~sdp0..\Source\ContentRenderingApiSystemTest\bin\Release\ContentRenderingApiSystemTest.dll
set MERGEPATH=%~sdp0..\Source\ContentRenderingApi\bin\Release\Merge
set RELEASEDATAENGINEDLLFILE=%~sdp0..\Source\Com\ContentRendering\Api\DataEngine\bin\Release\DataEngine.dll
set RELEASELOADERENGINEDLLFILE=%~sdp0..\Source\Com\ContentRendering\Api\LoaderEngine\bin\Release\LoaderEngine.dll
set RELEASEPARSERENGINEDLLFILE=%~sdp0..\Source\Com\ContentRendering\Api\ParserEngine\bin\Release\ParserEngine.dll
set RELEASERENDERENGINEDLLFILE=%~sdp0..\Source\Com\ContentRendering\Api\RenderEngine\bin\Release\RenderEngine.dll
set RELEASEAPIDLLFILE=%~sdp0..\Source\ContentRenderingApi\bin\Release\ContentRenderingApi.dll
set MERGEDRELEASEAPIDLLFILE=%~sdp0..\Source\ContentRenderingApi\bin\Release\Merge\ContentRenderingApi.dll
set PUBLISHZIPFILESTART=%TEMP%\Publish\ContentRendering\%MAJOR%.%MINOR%.%REVISION%\ContentRenderingApi %MAJOR%.%MINOR%.%REVISION%.
set PUBLISHZIPFILEEND= (AnyCpu, .NET 4.0).zip
set MSBUILDFILE=c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
set PUBLISHWEBSITEPATH=%TEMP%\Publish\ContentRendering\%MAJOR%.%MINOR%.%REVISION%\Website

rem replace settings with machine specific values
if exist "%~sdp0Configuration.%COMPUTERNAME%.bat" call "%~sdp0Configuration.%COMPUTERNAME%.bat"

rem exit if an error occured
if %ERRORLEVEL% NEQ 0 exit 1